package com.huanxing.cloud.pay.api.factory;

import com.huanxing.cloud.pay.api.handler.PayOrderHandler;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Service
@AllArgsConstructor
public class PayHandlerFactory {

	public final Map<String, PayOrderHandler> payOrderHandlerMap = new ConcurrentHashMap();

	public PayOrderHandler getPayOrderHandler(String payChannel) {
		return payOrderHandlerMap.get(payChannel + "PayOrderHandler");
	}

}
